-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Allow SearchParameterMap to be used by IRepository #7165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
michaelabuckley
wants to merge
68
commits into
master
Choose a base branch
from
mb-hapi-fhir-repository-search
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit c3bc9bd.
…itory-search # Conflicts: # hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BundleBuilder.java # hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/HapiFhirRepositoryTest.java # hapi-fhir-repositories/pom.xml # hapi-fhir-repositories/src/main/java/ca/uhn/fhir/repository/impl/GenericClientRepository.java # hapi-fhir-repositories/src/main/java/ca/uhn/fhir/repository/impl/memory/InMemoryFhirRepository.java # hapi-fhir-repositories/src/main/resources/META-INF/services/ca.uhn.fhir.repository.IRepositoryLoader # hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/repository/HapiFhirRepository.java # hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/repository/IRepositoryTest.java
This Pull Request has failed the formatting check Please run You can automate this auto-formatting process to execute on the git pre-push hook, by installing pre-commit and then calling |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merge Request Description
Summary
This MR refactors the HAPI FHIR Repository search API to improve flexibility and maintainability by introducing a builder pattern for constructing search queries. The changes replace the rigid SearchConverter with a more extensible query building system that properly handles FHIR search parameters including special parameters like sorting, pagination, includes, and summary modes.
IRepositoryRestQueryBuilder
interface withSearchParameterMapRepositoryRestQueryBuilder
implementation for flexible query constructionSearchConverter
class (145 lines deleted) with specialized parameter processors (122 lines of new, focused code)Code Review Suggestions
SearchParameterMapRepositoryRestQueryBuilder
- ensure all FHIR special parameters (_sort, _include, _count, etc.) are handled correctly and edge cases are coveredIRepository
- implementors must override at least one method to avoid infinite recursionSearchParameterMapRepositoryRestQueryBuilder.buildFromQueryContributor()
handles the passthrough case when the contributor is already a SearchParameterMap (used for complex operations like $everything)QA Test Suggestions
Setup
Test Cases
Patient?name=John
) work identically through both old multimap and new builder APIs_sort
,_count
,_offset
,_include
,_revinclude
,_summary
,_contained
, and_total
to ensure they produce equivalent results